package com.qiniuyun.graph.api.compound;

import com.qiniuyun.graph.common.service.CompoundService;
import com.qiniuyun.graph.common.utils.ResultVOUtil;
import com.qiniuyun.graph.common.vo.CompoundVO;
import com.qiniuyun.graph.common.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/graph")
public class CompoundController {
    @Autowired
    private CompoundService compoundService;

    /**
     * 合成水印图
     *
     * @param compoundVO
     * @return
     */
    @PostMapping("/compound")
    public ResultVO getPicture(@RequestBody CompoundVO compoundVO) {
        return ResultVOUtil.success(compoundService.compoundGraph(compoundVO));
    }
}
